﻿using System.Configuration;
using UtfprLibrary.Exceptions;
using System;

namespace UtfprLibrary.Configurations {
    /// <summary>
    /// TODO
    /// </summary>
    internal class SecurityElement : ConfigurationElement {
        #region Properties
        
        /// <summary>
        /// TODO
        /// </summary>
        /// <exception cref="UtfprLibrary.Exceptions.UtfprConfigurationsException">Thrown when an exception occurs.</exception>
        [ConfigurationProperty("branch", IsRequired = true)]
        public string Branch {
            get {
                try {
                    return (string)this["branch"];
                } catch (Exception ex) {
                    throw new UtfprConfigurationsException("Could not get 'branch' value.", ex);
                }
            }
            set {
                try {
                    this["branch"] = value;
                } catch (Exception ex) {
                    throw new UtfprConfigurationsException("Could not set 'branch' value.", ex);
                }
            }
        }

        #endregion
    }
}
